/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package verins.Utils;

import javax.swing.JFrame;
import javax.swing.JOptionPane;

/**
 *
 * @author Hector
 */
public class Mensajes {


     public static void  alerta(String textoAlerta){
          JOptionPane.showMessageDialog(null, textoAlerta,"Alerta",JOptionPane.OK_OPTION);
      }
      
    
     public static boolean cancelar(java.awt.event.ActionEvent evt, JFrame frame){
        if (JOptionPane.showConfirmDialog(frame, "Se perderán los cambios ¿Desea continuar?","confirmar",JOptionPane.YES_NO_OPTION)==JOptionPane.OK_OPTION){
            return true;
        }else{
            return false;
        }
     }

      public static boolean guardar(java.awt.event.ActionEvent evt, JFrame frame){
        if (JOptionPane.showConfirmDialog(frame, "Se procederá a guardar los cambios ¿Desea continuar?","confirmar",JOptionPane.YES_NO_OPTION)==JOptionPane.OK_OPTION){
            return true;
        }else{
            return false;
        }
     }
      
      
      public static boolean exito(boolean respTransaccion){
          if (respTransaccion){
              JOptionPane.showMessageDialog(null, "Registro correcto");
              return true;
          }else{
              JOptionPane.showMessageDialog(null, "Registro incorrecto");
              return false;
          }
      }   
}
